package com.chuangke.common.myexcel;

import java.util.function.BiFunction;

import com.chuangke.common.exception.ChuangkeException;
import com.github.liaochong.myexcel.core.context.ReadContext;

@SuppressWarnings("rawtypes")
public class ReadExceptionHandle implements BiFunction<Throwable, ReadContext, Boolean>{

	@Override
	public Boolean apply(Throwable throwable, ReadContext context) {
		String msg = "第" + (context.getRowNum() + 1) + "行，第" + (context.getColNum() + 1) + "列，值为"
				+ context.getVal() + ",不符合规范";
		throw new ChuangkeException(msg);
	}

}
